package com.zygh.policeasset.mapper;

import com.zygh.policeasset.pojo.PurchaseProcess;
import java.util.List;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.type.JdbcType;

@Mapper
/* loaded from: police-asset-2.0-0.0.1-SNAPSHOT.jar:BOOT-INF/classes/com/zygh/policeasset/mapper/PurchaseProcessMapper.class */
public interface PurchaseProcessMapper {
    @Insert({"insert into purchase_process (project_id,project_type,do_time,status,opinion,user_id) values(#{projectId},#{projectType},#{doTime},#{status},#{opinion},#{userId})"})
    int add(PurchaseProcess purchaseProcess);

    @Select({"select p.*,u.`name`  from purchase_process p LEFT JOIN `user` u ON p.`user_id` = u.`id` where p.project_id = #{projectId} and p.project_type = #{projectType} ORDER BY do_time"})
    @Results(id = "PurchaseProcessMap", value = {@Result(column = "id", property = "id", jdbcType = JdbcType.INTEGER, id = true), @Result(column = "project_id", property = "projectId", jdbcType = JdbcType.VARCHAR), @Result(column = "project_type", property = "projectType", jdbcType = JdbcType.VARCHAR), @Result(column = "do_time", property = "doTime", jdbcType = JdbcType.VARCHAR), @Result(column = "user_id", property = "userId", jdbcType = JdbcType.VARCHAR), @Result(column = "name", property = "name", jdbcType = JdbcType.VARCHAR)})
    List<PurchaseProcess> findAll(@Param("projectId") Integer num, @Param("projectType") String str);
}